import { continents, countryData } from '../dataset/countryData';

export const rawData = [
  { code: 'AFG', population: 37856121, gdpPerCapita: 496.6025042585 },
  { code: 'ALB', population: 2854191, gdpPerCapita: 5460.42823730592 },
  { code: 'DZA', population: 43294546, gdpPerCapita: 4468.45341883656 },
  { code: 'ASM', population: 50209, gdpPerCapita: 12886.1359517218 },
  { code: 'AND', population: 76474, gdpPerCapita: 41257.8045846483 },
  { code: 'AGO', population: 32375632, gdpPerCapita: 2189.85571407618 },
  { code: 'ATG', population: 91364, gdpPerCapita: 18884.3729680383 },
  { code: 'ARG', population: 44973465, gdpPerCapita: 9955.97478680428 },
  { code: 'ARM', population: 2962500, gdpPerCapita: 4597.22887399548 },
  { code: 'ABW', population: 109203, gdpPerCapita: 31096.2050738676 },
  { code: 'AUS', population: 25334826, gdpPerCapita: 54972.7017885437 },
  { code: 'AUT', population: 8879920, gdpPerCapita: 49885.9947355204 },
  { code: 'AZE', population: 10024283, gdpPerCapita: 4805.75371765917 },
  { code: 'BHS', population: 394675, gdpPerCapita: 32979.5401279534 },
  { code: 'BHR', population: 1483756, gdpPerCapita: 27259.7438599327 },
  { code: 'BGD', population: 164913055, gdpPerCapita: 2129.79896954606 },
  { code: 'BRB', population: 281207, gdpPerCapita: 20583.7265786414 },
  { code: 'BLR', population: 9419758, gdpPerCapita: 6837.76832136779 },
  { code: 'BEL', population: 11488980, gdpPerCapita: 46716.6227467964 },
  { code: 'BLZ', population: 385829, gdpPerCapita: 6190.04792278445 },
  { code: 'BEN', population: 12726755, gdpPerCapita: 1130.82135304977 },
  { code: 'BMU', population: 64107, gdpPerCapita: 115798.040775578 },
  { code: 'BTN', population: 764824, gdpPerCapita: 3576.87987077877 },
  { code: 'BOL', population: 11671386, gdpPerCapita: 3503.8960106182 },
  { code: 'BIH', population: 3345533, gdpPerCapita: 6122.3753450882 },
  { code: 'BWA', population: 2332083, gdpPerCapita: 7172.08956480028 },
  { code: 'BRA', population: 207455459, gdpPerCapita: 9029.83326742175 },
  { code: 'BRN', population: 442680, gdpPerCapita: 30426.5730284202 },
  { code: 'BGR', population: 6975761, gdpPerCapita: 9838.60058985384 },
  { code: 'BFA', population: 20961952, gdpPerCapita: 764.853077774946 },
  { code: 'BDI', population: 12255336, gdpPerCapita: 210.236494521532 },
  { code: 'CPV', population: 514104, gdpPerCapita: 4380.7811916403 },
  { code: 'KHM', population: 16481304, gdpPerCapita: 2225.87705485686 },
  { code: 'CMR', population: 25506095, gdpPerCapita: 1555.22660476477 },
  { code: 'CAN', population: 37618495, gdpPerCapita: 46352.8693445211 },
  { code: 'CYM', population: 67327, gdpPerCapita: 88254.2903677044 },
  { code: 'CAF', population: 4944703, gdpPerCapita: 449.228467602439 },
  { code: 'TCD', population: 16685223, gdpPerCapita: 678.142035723965 },
  { code: 'CHI', population: 165639, gdpPerCapita: 60568.1085272721 },
  { code: 'CHL', population: 19197744, gdpPerCapita: 14495.716721687 },
  { code: 'CHN', population: 1407745000, gdpPerCapita: 10143.8602206165 },
  { code: 'COL', population: 49907985, gdpPerCapita: 6472.54544924705 },
  { code: 'COM', population: 786578, gdpPerCapita: 1519.26386436068 },
  { code: 'COD', population: 92947442, gdpPerCapita: 557.044161335917 },
  { code: 'COG', population: 5616661, gdpPerCapita: 2488.42466724916 },
  { code: 'CRI', population: 4999553, gdpPerCapita: 12884.6859951989 },
  { code: 'CIV', population: 28193009, gdpPerCapita: 2141.76836170115 },
  { code: 'HRV', population: 3949390, gdpPerCapita: 15563.8167397199 },
  { code: 'CUB', population: 11202846, gdpPerCapita: 9232.26115935183 },
  { code: 'CUW', population: 157441, gdpPerCapita: 19220.6866958303 },
  { code: 'CYP', population: 1286671, gdpPerCapita: 29703.052734375 },
  { code: 'CZE', population: 10671870, gdpPerCapita: 24062.7190013343 },
  { code: 'DNK', population: 5814422, gdpPerCapita: 59404.2663247723 },
  { code: 'DJI', population: 1088709, gdpPerCapita: 2837.17103336917 },
  { code: 'DMA', population: 67880, gdpPerCapita: 9009.09011545429 },
  { code: 'DOM', population: 10894043, gdpPerCapita: 8164.22080932117 },
  { code: 'ECU', population: 17340021, gdpPerCapita: 6205.05759479761 },
  { code: 'EGY', population: 107553158, gdpPerCapita: 2962.98892023003 },
  { code: 'SLV', population: 6222318, gdpPerCapita: 4320.11671534627 },
  { code: 'GNQ', population: 1670177, gdpPerCapita: 6804.14923073888 },
  { code: 'EST', population: 1326898, gdpPerCapita: 24021.2501413306 },
  { code: 'SWZ', population: 1179874, gdpPerCapita: 3894.32951592818 },
  { code: 'ETH', population: 115737383, gdpPerCapita: 828.70897229725 },
  { code: 'FRO', population: 51795, gdpPerCapita: 63064.6343127366 },
  { code: 'FJI', population: 914899, gdpPerCapita: 5950.82868635508 },
  { code: 'FIN', population: 5521606, gdpPerCapita: 48358.1807773701 },
  { code: 'FRA', population: 67382061, gdpPerCapita: 40408.2848574751 },
  { code: 'PYF', population: 279034, gdpPerCapita: 21582.5892046801 },
  { code: 'GAB', population: 2267706, gdpPerCapita: 7441.1786472281 },
  { code: 'GMB', population: 2456844, gdpPerCapita: 738.186751987483 },
  { code: 'GEO', population: 3720161, gdpPerCapita: 4741.2832715876 },
  { code: 'DEU', population: 83092962, gdpPerCapita: 47623.8656074829 },
  { code: 'GHA', population: 31258945, gdpPerCapita: 2186.18924111824 },
  { code: 'GRC', population: 10721582, gdpPerCapita: 19335.3602002969 },
  { code: 'GRL', population: 56225, gdpPerCapita: 53309.2035905065 },
  { code: 'GRD', population: 115981, gdpPerCapita: 10462.7929159533 },
  { code: 'GUM', population: 161808, gdpPerCapita: 39274.9431424899 },
  { code: 'GTM', population: 17103803, gdpPerCapita: 4511.99755157656 },
  { code: 'GIN', population: 13034346, gdpPerCapita: 1031.34146480732 },
  { code: 'GNB', population: 1967696, gdpPerCapita: 807.359903965493 },
  { code: 'GUY', population: 807665, gdpPerCapita: 6405.82443444562 },
  { code: 'HTI', population: 11105163, gdpPerCapita: 1352.17204191532 },
  { code: 'HND', population: 9943633, gdpPerCapita: 2502.32744328073 },
  { code: 'HKG', population: 7507900, gdpPerCapita: 48359.0011950597 },
  { code: 'HUN', population: 9771141, gdpPerCapita: 16786.2136399075 },
  { code: 'ISL', population: 360563, gdpPerCapita: 68452.23622306 },
  { code: 'IND', population: 1389030312, gdpPerCapita: 2041.42863698585 },
  { code: 'IDN', population: 272489381, gdpPerCapita: 4106.94856173421 },
  { code: 'IRN', population: 87051648, gdpPerCapita: 3831.27894763337 },
  { code: 'IRQ', population: 41192171, gdpPerCapita: 5671.8568632942 },
  { code: 'IRL', population: 4934340, gdpPerCapita: 82508.4659883582 },
  { code: 'IMN', population: 83957, gdpPerCapita: 87127.5517977404 },
  { code: 'ISR', population: 9054000, gdpPerCapita: 44140.8289372511 },
  { code: 'ITA', population: 59729081, gdpPerCapita: 33812.788724868 },
  { code: 'JAM', population: 2823271, gdpPerCapita: 5607.24300668501 },
  { code: 'JPN', population: 126633000, gdpPerCapita: 40415.9567649547 },
  { code: 'JOR', population: 10671891, gdpPerCapita: 4170.1144003465 },
  { code: 'KAZ', population: 19209555, gdpPerCapita: 9457.12614657136 },
  { code: 'KEN', population: 51202827, gdpPerCapita: 1960.40808854893 },
  { code: 'KIR', population: 123921, gdpPerCapita: 1750.99750920482 },
  { code: 'KOR', population: 51764822, gdpPerCapita: 31902.4169048194 },
  { code: 'XKX', population: 1788891, gdpPerCapita: 4415.99716107514 },
  { code: 'KWT', population: 4442316, gdpPerCapita: 31707.8737464917 },
  { code: 'KGZ', population: 6590211, gdpPerCapita: 1421.99927504102 },
  { code: 'LAO', population: 7237636, gdpPerCapita: 2589.32081035237 },
  { code: 'LVA', population: 1913822, gdpPerCapita: 17294.9751600969 },
  { code: 'LBN', population: 5794594, gdpPerCapita: 8905.88005497437 },
  { code: 'LSO', population: 2209405, gdpPerCapita: 1082.05706777516 },
  { code: 'LBR', population: 5043721, gdpPerCapita: 658.164180770507 },
  { code: 'LBY', population: 6951033, gdpPerCapita: 9963.19489084483 },
  { code: 'LIE', population: 38563, gdpPerCapita: 166907.839305016 },
  { code: 'LTU', population: 2794137, gdpPerCapita: 19727.7607453736 },
  { code: 'LUX', population: 620001, gdpPerCapita: 112726.439672814 },
  { code: 'MAC', population: 672000, gdpPerCapita: 81967.699172769 },
  { code: 'MDG', population: 28219554, gdpPerCapita: 499.818837622534 },
  { code: 'MWI', population: 19025752, gdpPerCapita: 580.889816066776 },
  { code: 'MYS', population: 33440596, gdpPerCapita: 10920.191763972 },
  { code: 'MDV', population: 487731, gdpPerCapita: 11740.2724029785 },
  { code: 'MLI', population: 21068405, gdpPerCapita: 820.197390833912 },
  { code: 'MLT', population: 504062, gdpPerCapita: 32412.2697818499 },
  { code: 'MHL', population: 44007, gdpPerCapita: 5292.33985502306 },
  { code: 'MRT', population: 4467708, gdpPerCapita: 1767.072710621 },
  { code: 'MUS', population: 1265985, gdpPerCapita: 11403.2527870674 },
  { code: 'MEX', population: 125762982, gdpPerCapita: 10369.5553568761 },
  { code: 'FSM', population: 110282, gdpPerCapita: 3572.65918282222 },
  { code: 'MDA', population: 2664224, gdpPerCapita: 4405.33418162155 },
  { code: 'MCO', population: 38109, gdpPerCapita: 193746.785647412 },
  { code: 'MNG', population: 3267673, gdpPerCapita: 4347.54610314873 },
  { code: 'MNE', population: 622028, gdpPerCapita: 8909.6538759126 },
  { code: 'MAR', population: 36210898, gdpPerCapita: 3508.09765625 },
  { code: 'MOZ', population: 29884380, gdpPerCapita: 519.09255091362 },
  { code: 'MMR', population: 52640713, gdpPerCapita: 1425.98954211903 },
  { code: 'NAM', population: 2650494, gdpPerCapita: 4731.9210318831 },
  { code: 'NRU', population: 11587, gdpPerCapita: 10776.8284610316 },
  { code: 'NPL', population: 28414064, gdpPerCapita: 1203.14294706401 },
  { code: 'NLD', population: 17344874, gdpPerCapita: 53554.9007491475 },
  { code: 'NCL', population: 283606, gdpPerCapita: 33411.3358835672 },
  { code: 'NZL', population: 4979200, gdpPerCapita: 42747.2099299966 },
  { code: 'NIC', population: 6483657, gdpPerCapita: 1958.62132892996 },
  { code: 'NER', population: 22947757, gdpPerCapita: 561.691304349698 },
  { code: 'NGA', population: 209485641, gdpPerCapita: 2265.15520863056 },
  { code: 'MKD', population: 1876262, gdpPerCapita: 6718.85826635458 },
  { code: 'MNP', population: 48129, gdpPerCapita: 24496.6652122421 },
  { code: 'NOR', population: 5347896, gdpPerCapita: 76430.5889473338 },
  { code: 'OMN', population: 4591241, gdpPerCapita: 19180.1864152801 },
  { code: 'PAK', population: 230800899, gdpPerCapita: 1390.41690981745 },
  { code: 'PLW', population: 17798, gdpPerCapita: 15841.1935329812 },
  { code: 'PAN', population: 4234700, gdpPerCapita: 16477.9066285687 },
  { code: 'PNG', population: 9609010, gdpPerCapita: 2575.77274251891 },
  { code: 'PRY', population: 6515058, gdpPerCapita: 5821.18199548637 },
  { code: 'PER', population: 32449303, gdpPerCapita: 7037.00803692604 },
  { code: 'PHL', population: 110804683, gdpPerCapita: 3400.78949772302 },
  { code: 'POL', population: 37965475, gdpPerCapita: 15874.5220531254 },
  { code: 'PRT', population: 10286263, gdpPerCapita: 23343.3628970034 },
  { code: 'PRI', population: 3193694, gdpPerCapita: 32916.866800639 },
  { code: 'QAT', population: 2638657, gdpPerCapita: 66841.3013472693 },
  { code: 'ROU', population: 19371648, gdpPerCapita: 12992.0326104674 },
  { code: 'RUS', population: 145453291, gdpPerCapita: 11447.701171875 },
  { code: 'RWA', population: 12776103, gdpPerCapita: 810.051420243718 },
  { code: 'WSM', population: 209780, gdpPerCapita: 4351.94234943706 },
  { code: 'SMR', population: 34663, gdpPerCapita: 46627.0122356944 },
  { code: 'STP', population: 213392, gdpPerCapita: 1935.2931816596 },
  { code: 'SAU', population: 30063799, gdpPerCapita: 27892.8421521179 },
  { code: 'SEN', population: 16352922, gdpPerCapita: 1431.18128932159 },
  { code: 'SRB', population: 6945235, gdpPerCapita: 7755.632986437 },
  { code: 'SYC', population: 97625, gdpPerCapita: 19141.5118743615 },
  { code: 'SLE', population: 7731991, gdpPerCapita: 843.71251730417 },
  { code: 'SGP', population: 5703569, gdpPerCapita: 66081.7199235165 },
  { code: 'SXM', population: 40385, gdpPerCapita: 34861.469528968 },
  { code: 'SVK', population: 5454147, gdpPerCapita: 19406.0589683582 },
  { code: 'SVN', population: 2088385, gdpPerCapita: 25814.1687167572 },
  { code: 'SLB', population: 728147, gdpPerCapita: 2223.66502559565 },
  { code: 'SOM', population: 16030971, gdpPerCapita: 539.893931565468 },
  { code: 'ZAF', population: 59587885, gdpPerCapita: 6533.71121032856 },
  { code: 'ESP', population: 47134837, gdpPerCapita: 29776.2011500384 },
  { code: 'LKA', population: 21803000, gdpPerCapita: 4082.69404871533 },
  { code: 'KNA', population: 46952, gdpPerCapita: 23595.4923231291 },
  { code: 'LCA', population: 177661, gdpPerCapita: 11794.2056521711 },
  { code: 'MAF', population: 34267, gdpPerCapita: 19033.0649634889 },
  { code: 'VCT', population: 104167, gdpPerCapita: 8743.33202133753 },
  { code: 'SDN', population: 45548175, gdpPerCapita: 709.975280761719 },
  { code: 'SUR', population: 605768, gdpPerCapita: 6629.66775248603 },
  { code: 'SWE', population: 10278887, gdpPerCapita: 51773.0464558993 },
  { code: 'CHE', population: 8575280, gdpPerCapita: 84121.9310304414 },
  { code: 'SYR', population: 20353534, gdpPerCapita: 1109.53926036049 },
  { code: 'TJK', population: 9529966, gdpPerCapita: 871.022372934846 },
  { code: 'TZA', population: 59174891, gdpPerCapita: 1063.32250976563 },
  { code: 'THA', population: 71522271, gdpPerCapita: 7605.69657797759 },
  { code: 'TLS', population: 1300945, gdpPerCapita: 1562.36458881813 },
  { code: 'TGO', population: 8463068, gdpPerCapita: 826.260654099894 },
  { code: 'TON', population: 105669, gdpPerCapita: 4676.84790348236 },
  { code: 'TTO', population: 1363985, gdpPerCapita: 17431.0269266696 },
  { code: 'TUN', population: 11875081, gdpPerCapita: 3528.87213306798 },
  { code: 'TUR', population: 82579440, gdpPerCapita: 9215.44049888114 },
  { code: 'TKM', population: 6803944, gdpPerCapita: 6648.0348960628 },
  { code: 'TCA', population: 43166, gdpPerCapita: 27273.4376992357 },
  { code: 'TUV', population: 10581, gdpPerCapita: 5115.13075950206 },
  { code: 'UGA', population: 42999637, gdpPerCapita: 822.057058189153 },
  { code: 'UKR', population: 44957458, gdpPerCapita: 3619.86157226563 },
  { code: 'ARE', population: 9445785, gdpPerCapita: 44251.4541390148 },
  { code: 'GBR', population: 66836327, gdpPerCapita: 42662.5353740311 },
  { code: 'USA', population: 328329953, gdpPerCapita: 65604.6815198734 },
  { code: 'URY', population: 3397206, gdpPerCapita: 18315.7352857194 },
  { code: 'UZB', population: 32964701, gdpPerCapita: 2041.38480729431 },
  { code: 'VUT', population: 291985, gdpPerCapita: 3207.44650452083 },
  { code: 'VNM', population: 97173776, gdpPerCapita: 3440.90025375434 },
  { code: 'VIR', population: 106669, gdpPerCapita: 38633.5298915336 },
  { code: 'PSE', population: 4685306, gdpPerCapita: 3656.85827137011 },
  { code: 'YEM', population: 35111408, gdpPerCapita: 623.376164898164 },
  { code: 'ZMB', population: 18513839, gdpPerCapita: 1258.98619844462 },
  { code: 'ZWE', population: 15271368, gdpPerCapita: 1684.02790388182 },
];

export const populationGdpPerCapitaData = continents.reduce(
  (prev, continent) => ({
    ...prev,
    [continent]: rawData.filter((p) => countryData[p.code].continent === continent),
  }),
  {},
);
